<!-- search area   -->
<div class="row searchLineWrap">
	<form class="form-horizontal" method="post"
		action="${cxt!}/cms/advertisement/list" id="searchForm">
		<div class="col-md-12">
			<div class="row">
				<div class="col-md-3">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["advert.name"]}</label>
						<div class="col-md-7">
								<input type="text" class="form-control" name="advertisement.l_name"	placeholder="${_res['advert.name']}"  value="${paramMap['advertisement.l_name']}" />
						</div>
					</div>
				</div>

				<div class="col-md-3">
					<div class="form-group">
						<label class="col-md-4 control-label">${_res["advert.type"]}</label>
						<div class="col-md-8">
							<#dict type="select" name="advertisement.f_type" dictCode="ADV_TYPE" value="${paramMap['advertisement.f_type']}"/>
						</div>
					</div>
				</div>

				<div class="col-md-3">
					<div class="form-group">
						<label class="col-md-4 control-label">${_res["advert.status"]}</label>
						<div class="col-md-8">
							<#dict type="select" name="advertisement.f_status" dictCode="COMMON_STATUS" value="${paramMap['advertisement.f_status']}"/>
						</div>
					</div>
				</div>

				<div class="col-md-2">
					<div class="form-group">
						<% if(hasPrivilegeUrl("advertisementView")){ %>
							<button type="button" class="btn btn-primary pull-left" onclick="ajaxForm('content','searchForm')">
								<i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}
							</button>
						<% } %>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
<!-- search area end  -->


<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("advertisementAdd")){ %>
	<p> 
		<a href="javascript:void(0);" onClick="ajaxContent('/cms/advertisement/add/a');" class="btn btn-primary pull-left">${_res["advert.add"]}</a>
		<div class="clearfix"></div>
	</p>
	<% } %>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>${_res["advert.picture"]}</th>
				<th>${_res["advert.name"]}</th>
				<th>${_res["advert.positionid"]}</th>
				<th>${_res["advert.href"]}</th>
				<th>${_res["advert.status"]}</th>
				<th>${_res["system.lastUpdateTime"]}</th>
				<th>${_res["system.operator"]}</th>
			</tr>
		</thead>
		<tbody>
			<% for(item in splitPage.list){ %>
			<tr >
				<td style="position:relative"><img src="${imgCxt!}/${item.pictures!}" width="180px !important" height="50px !important" class="img"></td>
				<td>${item.name!}</td>
				<td>${item.advertisementPosition.name!}</td>
				<td>${item.href!}</td>
				<td><#dict type="lable" value='${item.status!}' dictCode="COMMON_STATUS"/></td>
				<td>${item.updatetime!,dateFormat="yyyy-MM-dd HH:mm"}</td>
				<td>
					<% if(hasPrivilegeUrl("advertisementView")){ %>
					<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/cms/advertisement/view/${item.id!}');">${_res["system.view"]}</button>
					<% } %> 
					<% if(hasPrivilegeUrl("advertisementEdit")){ %>
					<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/cms/advertisement/update/e-${item.id!}')">${_res["system.edit"]}</button>
					<% } %> 
					<% if(hasPrivilegeUrl("advertisementDelete")){ %>
					<button type="button" class="btn btn-sm btn-link" data-trigger="confirm" onClick="ajaxDelete('/cms/advertisement/delete/${item.id!}')">${_res["system.delete"]}</button>
					<% } %>
				</td>
			</tr>
			<% } %>
		</tbody>
	</table>
	<div id="splitPageDiv"><#page formId="searchForm" /></div>
	<#nav />
</div>